#include "thread.hpp"

using namespace ThreadModlue;
int main()
{
    Thread t([](){
        while(true)
        {
            std::cout << "我是一个新线程" << std::endl;
            sleep(1);
        } });

    t.Start();

    t.Detach();

    sleep(5);

    t.Stop();

    sleep(5);

    t.Join();

    return 0;
}